// src/assets/api/loginAndRegisterApi.js
import api from './index'

// 配置响应类型为blob以处理图片数据
export const loginAndRegisterApi = {
  getVerificationCode: () => api.get('/verificationCode/generate', { responseType: 'blob' }),

  login: (gitUsername, password, verificationCode) =>
    api.post('/loginController/login', { gitUsername, password, verificationCode }),
  register: (gitUsername, email, password) =>
    api.post('/registerController/register', { gitUsername, email, password }),
}
